package com.pinganfu.mock.server;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

public class Client3 {
	private Socket s;
    private BufferedReader br;
    //private BufferedReader line;
    private PrintWriter pw;
    private String line = "";
    public Client3() {
        try{
            //s = new Socket("127.0.0.1",8081);
            s = new Socket("10.59.33.49",8081);
            pw = new PrintWriter(s.getOutputStream(),true);
            br = new BufferedReader(new InputStreamReader(s.getInputStream()));
            pw.println("123 <?xml version='1.0' encoding=\"GB2312\"?><Cartoon><Message><CPRes><version>1.1.0</version><instId>CIBCC</instId><test>呵呵0000000000009501</test><bankCardNo>4512891016948106</bankCardNo><overdraft>A</overdraft></CPRes><Signature><SignatureValue>DDF11790</SignatureValue></Signature></Message></Cartoon> ");
            line = br.readLine();
            System.out.println(line);

            br.close();
            pw.close();
        }catch(IOException ie){
            ie.printStackTrace();
        }
    }
    public static void main(String[] args) throws Exception {
        new Client3();
    }
}
